(()=>{

    // 接口其实是一种规范
    interface IPerson{
        firstName:string
        lastName:string
    }

    
    class Person{
        firstName:string
        lastName:string
        fullName:string

        constructor(firstName:string,lastName:string){
            this.firstName = firstName
            this.lastName = lastName
            this.fullName = this.firstName+"_"+this.lastName
    
        }
        showFullName(){
            console.log(this.fullName)
        }
    }


    function showFullName(p:IPerson){

        return p.firstName+'__'+p.lastName
    }

    const p = new Person('诸葛','孔明')
    p.showFullName()

    let name = showFullName(p)
    console.log(name)


})()